public class PlayerStateBehavior_Steal_Grab : AbstractPlayerStateBehavior
{
	public static PlayerStateBehavior_Steal_Grab instance;

	private PlayerStateBehavior_Steal_Grab()
	{
	}

	public static PlayerStateBehavior_Steal_Grab getInstance()
	{
		if (instance == null)
		{
			instance = new PlayerStateBehavior_Steal_Grab();
		}
		return instance;
	}

	public override void enter(Player owner)
	{
		base.enter(owner);
		owner.playAnimation(AnimationName.player_steal_grab, 1f, -1f);
		owner.wait_frame = 18;
		if (owner.teamType == TeamType.USER)
		{
			Instance<Court>.instance.count_PauseData_User[5]++;
		}
		else
		{
			Instance<Court>.instance.count_PauseData_Com[5]++;
		}
	}

	public override void fixedUpdate(Player owner)
	{
		if (owner.wait_frame < 0)
		{
			if (owner.wait_frame != -2)
			{
				owner.getBallInHand();
				Instance<Ball>.instance.do_steal_grab();
				owner.wait_frame = -2;
			}
		}
		else
		{
			owner.wait_frame--;
		}
		if (!owner.IsPlayingAnimation(AnimationName.player_steal_grab))
		{
			Instance<Court>.instance.OnGrabedRebound(owner);
		}
	}

	public override void exit(Player owner)
	{
		base.exit(owner);
		owner.setNormalAnimation();
	}
}
